﻿CREATE TABLE [dbo].[QuanTri_EditUserRoleInGroup] (
    [ID]                  BIGINT IDENTITY (1, 1) NOT NULL,
    [IDPhanNhomNguoiDung] INT    NULL,
    [IDCapQuyen]          INT    NULL,
    [IDPhanNhomMenu]      INT    NULL,
    [Quyen_CapNhat]       BIT    NULL,
    [Quyen_Xem]           BIT    NULL,
    [Quyen_Xoa]           BIT    NULL,
    CONSTRAINT [PK_QuanTri_EditUserRoleInGroup] PRIMARY KEY CLUSTERED ([ID] ASC),
    CONSTRAINT [FK_QuanTri_EditUserRoleInGroup_QuanTri_PhanNhomMenu] FOREIGN KEY ([IDPhanNhomMenu]) REFERENCES [dbo].[QuanTri_PhanNhomMenu] ([ID]) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT [FK_QuanTri_EditUserRoleInGroup_QuanTri_PhanNhomNguoiDung] FOREIGN KEY ([IDPhanNhomNguoiDung]) REFERENCES [dbo].[QuanTri_PhanNhomNguoiDung] ([ID]) ON DELETE CASCADE ON UPDATE CASCADE
);

